---
title: Analysis
layout: handbook
---

<div class="row">
    <div class="span4">
        <ul class="nav nav-list span3">
        
            <li class="nav-header">Introduction</li>
            
                <li><a href="ch001_introduction.html">Introduction</a></li>
            
                <li><a href="ch002_working-with-others.html">Working with others</a></li>
            
                <li><a href="ch003_gov-gov-collaboration.html">Helping the government help itself</a></li>
            
        
            <li class="nav-header">Data Literacy</li>
            
                <li><a href="ch005_introduction-to-data-literacy.html">Data-driven advocacy and research</a></li>
            
                <li><a href="ch006_types-of-data.html">Types of data</a></li>
            
                <li><a href="ch007_getting-cleaning.html">Getting & cleaning data</a></li>
            
                <li><a href="ch008_anaysis.html">Analysis</a></li>
            
                <li><a href="ch009_ngo-ngo-collaboration.html">Using technology in your work</a></li>
            
        
            <li class="nav-header">Presentation and engagement</li>
            
                <li><a href="ch011_defining-the-scopetopic.html">Presentation and engagement</a></li>
            
                <li><a href="ch012_selecting-methods-and-tools.html">Selecting methods and tools</a></li>
            
        
            <li class="nav-header">Appendices</li>
            
                <li><a href="ch014_resources.html">Resources</a></li>
            
                <li><a href="ch015_glossary.html">Glossary</a></li>
            
        
            <li class="nav-header">Further information</li>
            <li><a href="http://okfn.booktype.pro/spending-data-handbook/">Contribute to the book</a></li>
            <li><a href="spending-data-handbook.pdf"><strong>Download a PDF version</strong></a></li>
            <li><a href="Spending_Data_Handbook.epub">ePub Version (iPad)</a></li>
            <li><a href="Spending_Data_Handbook.mobi">MOBI Version (Amazon Kindle)</a></li>
        </ul>
    </div>
    <div class="span8">
        <div><h2>Analysis</h2>
<p style="text-align: center;"><img src="static/pipeline-analysing-data.jpg" alt="" width="874" height="475"></p>
<p style="text-align: center;"><em>Data Processing Pipeline</em></p>
<p style="text-align: center;">&#160;</p>
<div>Dear reader - we know you are the experts. We're not going to teach you all the basics, but this section's aim is to show you how technology can help speed up, scale up or simplify your working practices. For this reason in this section we will say only a few words about statistical methods, even though many of you will be very familiar with those.</div>
<p>Once you have your data in a suitable format to be dealt with, much of your analysis can be automated with a custom program or inside spreadsheet software. Obviously the deeper your data dive is, the less automated things become, but having a standard set of post-processing, analytical steps to run on a dataset helps make sure you haven't missed anything. Some of the steps may seem basic, but it always helps to have a checklist!</p>
<p><strong>Sorting data</strong></p>
<p>Possibly the simplest way to find some interesting points is to sort by a column or category. In spending datasets, it's common to rank data by the largest transactions and look at the beneficiaries. This also gets you the maximum or minimum values of a column, which could be interesting.</p>
<p><strong>Basic statistical analysis</strong></p>
<p>Statistical analysis such as calculating percentiles or the average of a dataset, are essential to characterize your data. These are available in most programming languages as well as most spreadsheet programs like excel. A more complete list of statistical tools and resources can be found at the resources chapter.</p>
<ul><li>An <strong>average</strong> is a measure of central tendency in a sample. It can be described as the "typical" or representative value of a data set. Knowing the average helps detect whether any single payment is atypical.</li>
<li>A <strong>percentile</strong> is the value of a variable under which a certain percentage of the data fall. For example, if a transaction amount is in the 90th percentile, then it is larger than 89% of the transactions in the dataset.</li>
<li>A <strong>standard deviation</strong> measures how far away a value is from the average. If your standard deviation is low, then it means your row values are clustered together. If it's high, then they are spread out. By checking for values that are one, two, or three standard deviations outside the mean, you can detect outliers. Outliers could be errors or extremely interesting data points.</li>
</ul><p><strong>Summarizing or aggregating by categories</strong></p>
<p><strong></strong>Sometimes data is available at a very high level of detail, making it hard to see the big picture. It's a good idea to have a standard set of categories to aggregate by, such as geographic unit, functional classification, account number, fiscal year or other temporal unit, government department, or even recipient.</p>
<p><strong>Normalization for comparability</strong></p>
<p><strong></strong>In order to be able to compare data across time or other parameters, you may need to systematically adjust the data values. Here are some examples.</p>
<ul><li><strong>Deflation or inflation</strong>. Expenditure data is naturally obtained with current (or nominal) money value, but such data is not directly comparable across different years since inflation affects the value of money. In order to compare currency across years, it is necessary to deflate or inflate the value according to a base year. For example if we wish to compare the budget of a program in dollars from 2000 with the same program in 2012 we must adjust the value of the 2000 data and the 2012 dollars to a base year. Deflator and inflator factors are calculated by central banks in most countries and a comprehensive list by country can be found at the World Bank website (<a title="http://worldbank.org" href="http://worldbank.org">http://worldbank.org</a>)</li>
<li><strong>Scale and normalize values</strong>. When we wish to compare patterns of budget programs sometimes the difference in scale between budgets may prove difficult to display in a graphic form. In such cases is useful to compare percentages instead of absolute numbers. For instance, it is very common to express budget and spending data as percentages of a country's GDP, instead of in absolute numbers. If you're mapping spending, make sure to scale your data by population density. Otherwise, your map will most likely just be a map of where your populace lives.</li>
</ul><div id="note">You may want to visualize your data to get better understanding of your initial assumptions. This may save&#160;you a lot of time in case your initial assumptions were not good, and may also help you to get more insight into new findings your data might contain but previously were not clearly visible. For this purpose you can use scatter plots, line graphs, heat maps, bar charts.</div></div>
    </div>
</div>
